# 配置类，所有的配置信息都会放到这个里面
class Settings():
    def __init__(self):
        self.screen_width = 1000
        self.screen_height = 700
        self.bg_color = (230,230,230)
        # self.ship_speed_factor = 1.5
        # 子弹的设置
        # self.bullet_speed_factor = 1
        self.bullet_width = 3
        self.bullet_height = 15
        self.bullet_color = 60,60,60
        self.bullet_allowed = 10  #屏幕上最多可显示的子弹数量，即限制子弹发射
        # self.alien_speed_factor = 0.2  # 外星人水平移动速度
        self.feet_drop_speed = 5    # 垂直速度
        # self.feet_direction = 1    # 移动方向，1右移，-1相反
        self.ship_limit = 3 #有多少条命
        # 以什么样的速度加快游戏节奏
        self.speedup_scale = 1.1
        self.initialize_dynamic_settings()

    def initialize_dynamic_settings(self):
        self.ship_speed_factor = 1.5
        self.bullet_speed_factor = 1
        self.alien_speed_factor = 0.2  # 外星人水平移动速度
        self.feet_direction = 1    # 移动方向，1右移，-1相反
        # 得分
        self.alien_points = 50


    def increase_speed(self):
            #"""提高速度设置"""
            self.ship_speed_factor *= self.speedup_scale
            self.bullet_speed_factor *= self.speedup_scale
            self.alien_speed_factor *= self.speedup_scale
            # 提高得分
            self.alien_points = int(self.alien_points * self.speedup_scale)
